.class public Lcom/estrongs/android/pop/app/FileSaveToActivity;
.super Lcom/estrongs/android/pop/app/FileChooserActivity;
.source "FileSaveToActivity.java"


# instance fields
.field private k:Lcom/estrongs/android/statistics/b;

.field private l:Ljava/lang/String;

.field private m:Ljava/lang/String;


# direct methods
.method public constructor <init>()V
    .locals 1

    .line 1
    invoke-direct {p0}, Lcom/estrongs/android/pop/app/FileChooserActivity;-><init>()V

    const/4 v0, 0x0

    .line 2
    iput-object v0, p0, Lcom/estrongs/android/pop/app/FileSaveToActivity;->k:Lcom/estrongs/android/statistics/b;

    return-void
.end method

.method private A()V
    .locals 3

    .line 1
    new-instance v0, Lcom/estrongs/android/util/e;

    iget-object v1, p0, Lcom/estrongs/android/pop/app/FileSaveToActivity;->m:Ljava/lang/String;

    new-instance v2, Lcom/estrongs/android/pop/app/FileSaveToActivity$c;

    invoke-direct {v2, p0}, Lcom/estrongs/android/pop/app/FileSaveToActivity$c;-><init>(Lcom/estrongs/android/pop/app/FileSaveToActivity;)V

    invoke-direct {v0, p0, v1, v2}, Lcom/estrongs/android/util/e;-><init>(Landroid/content/Context;Ljava/lang/String;Lcom/estrongs/android/util/e$b;)V

    .line 2
    invoke-virtual {v0}, Lcom/estrongs/android/util/e;->a()V

    return-void
.end method

.method static synthetic a(Lcom/estrongs/android/pop/app/FileSaveToActivity;)V
    .locals 0

    .line 2
    invoke-direct {p0}, Lcom/estrongs/android/pop/app/FileSaveToActivity;->A()V

    return-void
.end method

.method static synthetic a(Lcom/estrongs/android/pop/app/FileSaveToActivity;Ljava/lang/String;)V
    .locals 0

    .line 1
    invoke-direct {p0, p1}, Lcom/estrongs/android/pop/app/FileSaveToActivity;->e(Ljava/lang/String;)V

    return-void
.end method

.method static synthetic b(Lcom/estrongs/android/pop/app/FileSaveToActivity;)Ljava/lang/String;
    .locals 0

    .line 1
    iget-object p0, p0, Lcom/estrongs/android/pop/app/FileSaveToActivity;->m:Ljava/lang/String;

    return-object p0
.end method

.method static synthetic b(Lcom/estrongs/android/pop/app/FileSaveToActivity;Ljava/lang/String;)Ljava/lang/String;
    .locals 0

    .line 2
    iput-object p1, p0, Lcom/estrongs/android/pop/app/FileSaveToActivity;->m:Ljava/lang/String;

    return-object p1
.end method

.method private d(Ljava/lang/String;)Z
    .locals 2

    const/4 v0, 0x0

    if-eqz p1, :cond_1

    .line 1
    invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v1

    if-eqz v1, :cond_0

    goto :goto_0

    .line 2
    :cond_0
    new-instance v1, Ljava/io/File;

    invoke-direct {v1, p1}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    .line 3
    invoke-virtual {v1}, Ljava/io/File;->exists()Z

    move-result p1

    if-eqz p1, :cond_1

    const/4 p1, 0x1

    return p1

    :cond_1
    :goto_0
    return v0
.end method

.method private e(Ljava/lang/String;)V
    .locals 4

    .line 1
    iget-object v0, p0, Lcom/estrongs/android/pop/app/FileChooserActivity;->d:Lcom/estrongs/android/widget/c;

    iget-object v0, v0, Lcom/estrongs/android/widget/c;->t:Landroid/widget/EditText;

    invoke-virtual {v0}, Landroid/widget/EditText;->getText()Landroid/text/Editable;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v0

    const/4 v1, 0x1

    if-eqz v0, :cond_3

    .line 2
    invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v2

    if-eqz v2, :cond_0

    goto :goto_1

    .line 3
    :cond_0
    sget-object v2, Ljava/io/File;->separator:Ljava/lang/String;

    invoke-virtual {p1, v2}, Ljava/lang/String;->endsWith(Ljava/lang/String;)Z

    move-result v2

    if-eqz v2, :cond_1

    .line 4
    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    goto :goto_0

    .line 5
    :cond_1
    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    sget-object v3, Ljava/io/File;->separator:Ljava/lang/String;

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    .line 6
    :goto_0
    invoke-direct {p0, v0}, Lcom/estrongs/android/pop/app/FileSaveToActivity;->d(Ljava/lang/String;)Z

    move-result v2

    if-eqz v2, :cond_2

    const p1, 0x7f1106ac

    .line 7
    invoke-static {p0, p1, v1}, Lcom/estrongs/android/ui/view/d;->a(Landroid/content/Context;II)V

    return-void

    .line 8
    :cond_2
    new-instance v1, Lcom/estrongs/android/pop/app/FileSaveToActivity$d;

    invoke-direct {v1, p0, v0}, Lcom/estrongs/android/pop/app/FileSaveToActivity$d;-><init>(Lcom/estrongs/android/pop/app/FileSaveToActivity;Ljava/lang/String;)V

    const-string v0, "s1"

    invoke-static {v0, p0, p1, v1}, Lcom/estrongs/fs/impl/local/a;->a(Ljava/lang/String;Landroid/content/Context;Ljava/lang/String;Ljava/lang/Runnable;)V

    return-void

    :cond_3
    :goto_1
    const p1, 0x7f1106b5

    .line 9
    invoke-static {p0, p1, v1}, Lcom/estrongs/android/ui/view/d;->a(Landroid/content/Context;II)V

    return-void
.end method


# virtual methods
.method protected onCreate(Landroid/os/Bundle;)V
    .locals 2

    .line 1
    invoke-super {p0, p1}, Lcom/estrongs/android/pop/app/FileChooserActivity;->onCreate(Landroid/os/Bundle;)V

    .line 2
    invoke-virtual {p0}, Landroid/app/Activity;->getIntent()Landroid/content/Intent;

    move-result-object p1

    const-string v0, "filePath"

    invoke-virtual {p1, v0}, Landroid/content/Intent;->getStringExtra(Ljava/lang/String;)Ljava/lang/String;

    move-result-object p1

    iput-object p1, p0, Lcom/estrongs/android/pop/app/FileSaveToActivity;->l:Ljava/lang/String;

    .line 3
    invoke-virtual {p0}, Landroid/app/Activity;->getIntent()Landroid/content/Intent;

    move-result-object p1

    const-string v0, "fileEncoding"

    invoke-virtual {p1, v0}, Landroid/content/Intent;->getStringExtra(Ljava/lang/String;)Ljava/lang/String;

    move-result-object p1

    iput-object p1, p0, Lcom/estrongs/android/pop/app/FileSaveToActivity;->m:Ljava/lang/String;

    .line 4
    iget-object p1, p0, Lcom/estrongs/android/pop/app/FileChooserActivity;->d:Lcom/estrongs/android/widget/c;

    if-nez p1, :cond_0

    return-void

    .line 5
    :cond_0
    invoke-static {}, Lcom/estrongs/android/statistics/b;->b()Lcom/estrongs/android/statistics/b;

    move-result-object p1

    iput-object p1, p0, Lcom/estrongs/android/pop/app/FileSaveToActivity;->k:Lcom/estrongs/android/statistics/b;

    const-string v0, "act3"

    const-string v1, "file_save_to"

    .line 6
    invoke-virtual {p1, v0, v1}, Lcom/estrongs/android/statistics/b;->b(Ljava/lang/String;Ljava/lang/String;)V

    .line 7
    iget-object p1, p0, Lcom/estrongs/android/pop/app/FileChooserActivity;->d:Lcom/estrongs/android/widget/c;

    const/4 v0, -0x1

    invoke-virtual {p1, v0}, Lcom/estrongs/android/widget/c;->a(I)V

    .line 8
    iget-object p1, p0, Lcom/estrongs/android/pop/app/FileChooserActivity;->d:Lcom/estrongs/android/widget/c;

    const v0, 0x7f110066

    invoke-virtual {p0, v0}, Landroid/app/Activity;->getString(I)Ljava/lang/String;

    move-result-object v0

    new-instance v1, Lcom/estrongs/android/pop/app/FileSaveToActivity$a;

    invoke-direct {v1, p0}, Lcom/estrongs/android/pop/app/FileSaveToActivity$a;-><init>(Lcom/estrongs/android/pop/app/FileSaveToActivity;)V

    invoke-virtual {p1, v0, v1}, Lcom/estrongs/android/widget/c;->b(Ljava/lang/CharSequence;Landroid/content/DialogInterface$OnClickListener;)V

    .line 9
    iget-object p1, p0, Lcom/estrongs/android/pop/app/FileChooserActivity;->d:Lcom/estrongs/android/widget/c;

    const v0, 0x7f110299

    invoke-virtual {p0, v0}, Landroid/app/Activity;->getString(I)Ljava/lang/String;

    move-result-object v0

    const/4 v1, 0x0

    invoke-virtual {p1, v0, v1}, Lcom/estrongs/android/widget/c;->a(Ljava/lang/CharSequence;Landroid/content/DialogInterface$OnClickListener;)V

    .line 10
    iget-object p1, p0, Lcom/estrongs/android/pop/app/FileChooserActivity;->d:Lcom/estrongs/android/widget/c;

    iget-object p1, p1, Lcom/estrongs/android/widget/c;->s:Landroid/view/View;

    const/4 v0, 0x0

    invoke-virtual {p1, v0}, Landroid/view/View;->setVisibility(I)V

    .line 11
    iget-object p1, p0, Lcom/estrongs/android/pop/app/FileChooserActivity;->d:Lcom/estrongs/android/widget/c;

    iget-object p1, p1, Lcom/estrongs/android/widget/c;->t:Landroid/widget/EditText;

    iget-object v0, p0, Lcom/estrongs/android/pop/app/FileSaveToActivity;->l:Ljava/lang/String;

    invoke-static {v0}, Lcom/estrongs/android/util/h0;->y(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    invoke-virtual {p1, v0}, Landroid/widget/EditText;->setText(Ljava/lang/CharSequence;)V

    .line 12
    iget-object p1, p0, Lcom/estrongs/android/pop/app/FileChooserActivity;->d:Lcom/estrongs/android/widget/c;

    iget-object p1, p1, Lcom/estrongs/android/widget/c;->u:Landroid/widget/EditText;

    iget-object v0, p0, Lcom/estrongs/android/pop/app/FileSaveToActivity;->m:Ljava/lang/String;

    invoke-virtual {p1, v0}, Landroid/widget/EditText;->setText(Ljava/lang/CharSequence;)V

    .line 13
    iget-object p1, p0, Lcom/estrongs/android/pop/app/FileChooserActivity;->d:Lcom/estrongs/android/widget/c;

    iget-object p1, p1, Lcom/estrongs/android/widget/c;->u:Landroid/widget/EditText;

    new-instance v0, Lcom/estrongs/android/pop/app/FileSaveToActivity$b;

    invoke-direct {v0, p0}, Lcom/estrongs/android/pop/app/FileSaveToActivity$b;-><init>(Lcom/estrongs/android/pop/app/FileSaveToActivity;)V

    invoke-virtual {p1, v0}, Landroid/widget/EditText;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    return-void
.end method
